/**
 * Copyright © 2020 易久批信息技术有限公司. All rights reserved.
 */
package com.dysm.http;

import com.alibaba.fastjson.JSON;
import retrofit2.Call;
import retrofit2.Response;

import java.io.IOException;

/**
 *
 * @author xiay
 * @since 2020/12/9 11:26 上午
 */
public class HttpClientTest {

    public static void main(String[] args) throws IOException {
        ClientService clientService = HttpClientFactory.createClient(ClientService.class, "https://hz.mymlfz.com/");
        ClientParam param = new ClientParam();
        param.setPage(1);
        param.setSize(10);
        Call<ClientResult> query = clientService.query("traffic/getUserList",
                "YnRudXVsZjl1bGt1aWI0dGs4aDA=", param);
        Response<ClientResult> execute = query.execute();
        ClientResult body = execute.body();
        System.out.println(JSON.toJSONString(body));

    }


}
